import { http } from '@/axios'

/**
 * @description 用户信息
 */
export function userInformation() {
  return http.request({
    url: '/user/get_info',
    method: 'POST',
  })
}

/**
 * @description 用户登录
 */
export function login(data) {
  return http.request({
    url: '/user/login',
    method: 'POST',
    data,
  })
}

/**
 * @description 用户注册
 */
export function register(data) {
  return http.request({
    url: '/user/register',
    method: 'POST',
    data,
  })
}

/**
 * @description 修改密码
 */
export function changePass(data) {
  return http.request({
    url: '/user/change_pass',
    method: 'POST',
    data,
  })
}

/**
 * @description 用户列表
 */
export function userList(data) {
  return http.request({
    url: '/manage/list',
    method: 'POST',
    data,
  })
}

/**
 * @description 修改用户
 */
export function updateUser(data) {
  return http.request({
    url: '/manage/update',
    method: 'POST',
    data,
  })
}

/**
 * @description 删除用户
 */
export function deleteUser(data) {
  return http.request({
    url: '/manage/delete',
    method: 'POST',
    data,
  })
}
